home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / badfile.zip / BADFILE.DOC < prev    next >
Text File  |  1992-06-29  |  3KB  |  76 lines

  1.  June 29, 1992
  2.  
  3.   ============================================================
  4.  
  5.  BADFILE.EXE a program designed to remove a leading "-" from
  6.          files received through file echos.
  7.  
  8.  ============================================================
  9.  
  10.  Why Badfile?  It is clearly documented that Maximus BBS treats a
  11.  leading dash ("-") in a file name as a comment.  It has recently come to
  12.  my attention that this feature when combined with an oversight in some
  13.  file tossers can be used as a "back door" into Maximus CBBS.  This program
  14.  is designed to prevent that from happening.
  15.  
  16.  
  17.  You run this program after files are received, but before TICK processes
  18.  your files.
  19.  
  20. While a change to your batch file could do the trick, this program is passed 
  21. your incoming directory (IN in your TIC.CFG), and checks all files for the 
  22. leading "-" in the file name.  
  23.  
  24. When the program is run it attempts to create a badfiles directory under the 
  25. directory you specify on the command line.  This directory, specified on the 
  26. command line, should be the same one as the IN directory in your TIC.CFG file.
  27. If it finds any files with a leading "-" it renames them to the badfiles 
  28. directory (or in the current directory if the badfiles directory couldn't be 
  29. created) replacing the leading "-" with an "A".  If a file of that name 
  30. already exists, it replaces that character with a "B", etc.
  31.  
  32. When TIC is run, it will rename the original *.tic to *.bad so you can then 
  33. examine the culprit and delete it if necessary.
  34.  
  35. While this program solves the immediate problem of the leading "-" in a 
  36. filename coming into a Max system, Scott is correct that TICK and any other
  37. file tosser should have no reason to allow ctrl codes in a file description.
  38.  
  39. Just so you know, I will definitely make sure that this is addressed in the
  40. FileToss Project.  The FileToss Project has been designed based on input from
  41. FDN heads and FileMovers.  I am now advertising for programmers in the C_Echo.
  42. Tracking and directing the movement of the files through FIDO and tossing the
  43. files when they reach their destination(s) will be included in the
  44. functionality of this program.
  45.  
  46. If I can steal time from FileToss, the PDN, my BBS and  my family(!), I will 
  47. see about adding an option to the BADFILE program which will strip all ctrl 
  48. codes from file descriptions included in a tick file.
  49.  
  50. Janis Kracht
  51. 1:272/38
  52. IC PDN
  53.  
  54. ---------------
  55. Calling Badfile
  56. ---------------
  57. From my Batchfile:
  58.  
  59.       BADFILE C:\FD\INCOMING          REM  (note: no trailing backslash)
  60.       TICK /OC >> tick.log
  61.       Raid Announce
  62.       TICK
  63.  
  64.  
  65.  
  66.  
  67. This will change drive\directory to c:\fd\incoming, look for any files
  68. which begin with a dash, create a BADFILES directory (if it does not already
  69. exist) if it finds any files with a leading dash, move these files into the
  70. BADFILES directory renaming them as described above.  If it doesn't find any
  71. files with a leading dash, it exits.
  72.  
  73. Notes:
  74. The Errorlevel will be set to the number of files found with a leading dash,
  75. or 255 in the case of an invalid arguement on the command line.
  76.